package edu.arizona.sista.learn.model.groups;

/**
 * A general model for a thing.  A thing can be anything, but
 * it must be unique.  Hence it has a unique ID, and an optional
 * descriptive name.
 * 
 * @author Anh Tran
 *
 */
public class Thing {

	private static long ID = 0;
	
	private long _uniqueID;
	private String _name;
	
	public Thing() {
		_uniqueID = ID++;
		_name = "";
	}
	
	public Thing(String name) {
		_uniqueID = ID++;
		_name = name;
	}

	public long id() {
		return _uniqueID;
	}
	
	public String name() {
		return _name;
	}
	
//	@Override
//	public boolean equals(Object o) {
//	    if (o == null) return false;
//	    if (o == this) return true;
//	    if (this.getClass() != o.getClass()) return false;
//	    
//	    Person p = (Person)o;
//		if (this.id() == p.id()) {
//			return true;
//		}
//		return false;
//	}
	
	@Override
	public String toString() {
		return "{" + this.id() + ":" + this.name() + "}";
	}
}
